package com.example.demo.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.stereotype.Service;

/**
 * 版权：(C) 版权所有 2000-2020 上海天好电子商务有限公司苏州分公司
 * <简述>
 * <详细描述>
 *
 * @author LiuShanshan
 * @version $Id$
 */
@Service
public class PersonService {
    // 限速器
    @SentinelResource(value = "helloworld",blockHandler = "back")
    public String getBody(){
        return "成功访问";
    }

    public String back(BlockException e) {

        return "降级了....";
    }
}
